Skip to content

Conversation

wsmoses
Copy link
Contributor

@wsmoses wsmoses commented Sep 18, 2025

May be an alternate resolution to EnzymeAD/Enzyme.jl#2589

probably merits runnign enzyme tests here to confirm it works?

May be an alternate resolution to EnzymeAD/Enzyme.jl#2589

probably merits runnign enzyme tests here to confirm it works?
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.34%. Comparing base (7249158) to head (ad8a0c2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ext/DynamicPPLEnzymeCoreExt.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1043   +/-   ##
=======================================
  Coverage   82.34%   82.34%           
=======================================
  Files          38       38           
  Lines        3949     3949           
=======================================
  Hits         3252     3252           
  Misses        697      697           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coveralls
Copy link

coveralls commented Sep 18, 2025

Pull Request Test Coverage Report for Build 17824816617

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 82.601%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ext/DynamicPPLEnzymeCoreExt.jl 0 1 0.0%
Totals Coverage Status
Change from base Build 17494778045: 0.0%
Covered Lines: 3252
Relevant Lines: 3937

💛 - Coveralls

@penelopeysm
Copy link
Member

The offending model does work with this PR now (code from #947 (comment)):

using DynamicPPL, Distributions
import Enzyme: Enzyme, Forward, Reverse, set_runtime_activity, Const
@model function mc()
    x = Vector{Float64}(undef, 5)
    x[1] ~ Normal()
    x[2] ~ InverseGamma(2, 3)
    x[3] ~ truncated(Normal(), -5, 20)
    x[4:5] ~ Dirichlet([1.0, 2.0])
end
model = mc()
vi = VarInfo(model)
params = fill(0.5, 5)
function logp(x, model, vi)
    varinfo_new = DynamicPPL.unflatten(vi, x)
    varinfo_eval = last(DynamicPPL.evaluate!!(model, varinfo_new))
    return getlogjoint(varinfo_eval)
end
logp(params, model, vi)

Enzyme.gradient(set_runtime_activity(Forward), logp, params, Const(model), Const(vi))

Enzyme.gradient(set_runtime_activity(Reverse), logp, params, Const(model), Const(vi))

@penelopeysm
Copy link
Member

Will approve once CI passes, thanks @wsmoses!

@penelopeysm penelopeysm added this pull request to the merge queue Sep 18, 2025
@penelopeysm penelopeysm removed this pull request from the merge queue due to a manual request Sep 18, 2025
@penelopeysm penelopeysm merged commit 142dddf into TuringLang:main Sep 18, 2025
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants